def read():
  s = input()
  if not ('.' in s):
    s += '.'
  s1 = s[:s.find('.')]
  s2 = s[s.find('.')+1:]
  s2 += '0' * (9 - len(s2))
  return int(s1+s2)
  


def gcd(a,b):
  if (a==0) or (b==0):
    return a+b
  else:
    return gcd(b, a % b)

L = read()
a = read()
b = read()

ans = L // (a // gcd(a,b) * b)

if not (L % (a // gcd(a,b) * b)):
  ans -= 1

print(ans)
